Xbasic

SQL_TableImport Function

Syntax

Status as P = SQL_TableImport(P SqlConn ,C owner ,C tablename ,C localfilename [,L ShowProgress [,L SizeToFit [,L AllowCancel [,L AddTableToDatabase [,C StatusBarFormatString ]]]]])

Arguments

A dot variable that contains error information.

Pointer

Element
Description
.HasError

L Indicates whether an error occurred. The options are:

.T.
.F.
.ErrorText

C Contains an error message.

.UserCancelled

L Specifies whether the user cancelled the operation. The options are:

.T.
.F.
SqlConn

A SQL::Connection object that established the connection to the back-end database.

owner

The owner of the database, if required.

tablename

The name of the back-end database table to copy.

localfilename

The path and name of the .DBF file to create.

ShowProgress

Logical. Optional. Default = .T. . Indicates whether to display a progress indicator on the Status Bar.

SizeToFit

Logical. Optional. Default = .T. . Indicates whether to size the target table's fields to fit the data.

AllowCancel

Optional. Default = .T. . Indicates whether to display a button that allow's the user to cancel the import operation.

AddTableToDatabase

Optional. Default = .T. . Indicates whether to create a new table, if it does not already exist.

StatusBarFormatString

Optional. Default = "". The format to use to display the Status Bar. This parameter is only relevant if Show_Progress is set to .T. . See STATUSBAR.ABORT_CHECK().

Description

Import a SQL table into a DBF table. Optionally adds the table to the current database.

Discussion

The SQL_TableImport() function imports a table from a back-end SQL database to a DBF table.

Limitations

Desktop applications only.

See Also